import requestV2 from "@/utils/requestV2";

export function list() {
  return requestV2({
    url: "robot/task/list",
  })
}


export function getOptions(){
  return new Promise((resolve, reject) => {
    list().then(r => {
      resolve(r.map(({id,name,viewRouter}) => {return {id: id, name: name, viewRouter: viewRouter}}))
    }).catch(err => {
      reject(err)
    })
  })
}